/*
    Android Asynchronous Http Client
    Copyright (c) 2013 JIXIAOLONG <MicroJixl@gmail.com>

    Licensed under the Apache License, Version 2.0 (the "License");
    you may not use this file except in compliance with the License.
    You may obtain a copy of the License at

        http://www.apache.org/licenses/LICENSE-2.0

    Unless required by applicable law or agreed to in writing, software
    distributed under the License is distributed on an "AS IS" BASIS,
    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    See the License for the specific language governing permissions and
    limitations under the License.
 */
package com.jxl.netframe.log;

import android.util.Log;


/** 
 * @author JiXL
 * @time 2013-4-16 上午10:38:31
 * Net frame Logger.
 */
public class Logger {
	public static final int ERROR =1;
	public static final int WRAN =2;
	public static final int DEBUG =3;
	public static final int INFO =4;
	public static final int VERBOSE =5;

	public static int TAG_Filter =6;

	public static void e(String tag,String msg){
		if(TAG_Filter>ERROR && null != tag && null != msg){
			Log.e(tag, msg);
		}
	}
	public static void w(String tag,String msg){
		if(TAG_Filter>WRAN && null != tag && null != msg){
			Log.w(tag, msg);
		}
	}
	public static void i(String tag,String msg){
		if(TAG_Filter>INFO && null != tag && null != msg){
			Log.i(tag, msg);
		}
	}
	public static void d(String tag,String msg){
		if(TAG_Filter>DEBUG && null != tag && null != msg){
			Log.d(tag, msg);
		}
	}
	public static void v(String tag,String msg){
		if(TAG_Filter > VERBOSE && null != tag && null != msg){
			Log.v(tag, msg);
		}
	}
}
